scrumColumn = Ext.extend(scrumColumnUi, {
    defaultType : 'ticket'
    ,ticketDDGroup : 'scrumboard'
    ,initComponent : function()
    {
        scrumColumn.superclass.initComponent.call(this);
    }
    ,reloadTickets : function(filters)
    {
        this.removeAll();
        this.loadTickets(filters);
    }
    ,loadTickets : function(filters)
    {
        Ext.Ajax.request({
			url:'Ticket/load/scrumState:'+this.scrumState
            ,params: filters
            ,scope: this
            ,failure : sweatShop.globals.formSubmitFailed
            ,success : this.ticketQueryHandler
		});
    }
    , ticketQueryHandler: function (response, request) {
        //console.log(response.responseText);
        var result = Ext.util.JSON.decode(response.responseText);
        console.log(result);
        if (result.success == false) {
            Ext.MessageBox.alert('Error', result.message);
        }else{
            this.addTickets(result.data);
        }
    }
    , addTickets : function (bunchOfTickets)
    {
        console.log('adding tickets', bunchOfTickets);
        for (var n in bunchOfTickets)
        {
            if(!bunchOfTickets[n].id)
                continue;
            bunchOfTickets[n].ticketId = bunchOfTickets[n].id
            this.addTicket(bunchOfTickets[n]);
            console.log(bunchOfTickets[n]);
        }
        this.doLayout();
    }
    , addTicket : function (ticketInfo)
    {
        newTicket = new ticket({
            id: 'ticket-'+ticketInfo.ticketId
            ,ticketData: ticketInfo
        });
        if(this.ticketDDGroup)
        {
            newTicket.draggable.ddGroup = this.ticketDDGroup;
        }
        this.insert(0,newTicket);
    }
});

Ext.reg('scrumcolumn', scrumColumn);